/***************************************************
 @Name :        小铭同学
 @Time :        2022-10-30
 @Email :       LiaoMingWJ233@163.com
 @Comment :     代码格式规范与参考，命名规则等
 @FileName :    codestyle.c
 @Version :     1.0
****************************************************/


#include "codestyle.h"


/* 全局变量定义 */
uint8_t codestyle_a;    //以文件名作为前缀
uint8_t codestyle_b;

/* ---------------------------- 方法声明 ------------------------------------ */
/* 模块中的函数声明 */
//数据操作
static void codestyle_fun1(uint8_t d1, uint8_t d2);    //以文件名作为前缀
static void codestyle_fun2(uint8_t d1, uint8_t d2);

static void codestyle_fun3(uint8_t d1, uint8_t d2);

static void codestyle_fun4(uint8_t d1, uint8_t d2);

//设备操作
static void codestyle_device1_init(void);

static void codestyle_device2_init(void);

/* ---------------------------- 外部接口 ------------------------------------ */
/* 数据操作接口 */
const xxx_operations_t xxx_ops = {
    .operations1 = codestyle_fun1,
    .operations2 = codestyle_fun2,
    .operations3 = codestyle_fun3,
    .operations4 = codestyle_fun4,
};

/* 外部器件操作接口 */
const xxx_device_t xxxxxxx = {
    .devece1_init = codestyle_device1_init,
    .devece2_init = codestyle_device2_init,
    .ops = &xxx_ops
};



/* ---------------------------- 方法实现 ------------------------------------ */
/* 操作实现方法 */
static void codestyle_fun1(uint8_t d1, uint8_t d2)
{
  /*
      code...
  */
}

static void codestyle_fun2(uint8_t d1, uint8_t d2)
{
  /*
      code...
  */
}

static void codestyle_fun3(uint8_t d1, uint8_t d2)
{
  /*
      code...
  */
}

static void codestyle_fun4(uint8_t d1, uint8_t d2)
{
  /*
      code...
  */
}


static void codestyle_device1_init(void)
{
  /*
      code...
  */
}

static void codestyle_device2_init(void)
{
  /*
      code...
  */
}


/* 全局函数 */
void ops_example(void)
{
  xxx_ops.operations1(codestyle_a, codestyle_b);
  xxx_ops.operations2(codestyle_a, codestyle_b);
  xxx_ops.operations3(codestyle_a, codestyle_b);
  xxx_ops.operations4(codestyle_a, codestyle_b);
}








